package com.hotel.entity;


import org.apache.tomcat.util.http.fileupload.FileItem;

/**
 * 公告
 */
public class Notify {

    private String id;
    private String notifyName;    //公告名称
    private String uploader;      //上传者ID
    private String fileName;      //附件名称
    private String fileSize;      //文件大小
    private Integer downTimes;    //下载次数
    private String createDate;    //创建日期
    private String nickName;      //上传者名称
    private String note;          //公告备注

    public Notify() {
    }

    public Notify(String line) {
        String[] data = line.split(",");
        this.id = data[0];
        this.notifyName = data[1];
        this.uploader = data[2];
        this.fileName = data[3];
        this.fileSize = data[4];
        this.downTimes = Integer.valueOf(data[5]);
        this.note = data[6];
    }

    //{ps}这一个数据项与数据库无关(用作文件上传)
    //    写入服务器磁盘。
    private FileItem fileItem;    //文件数据

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getNotifyName() {
        return notifyName;
    }

    public void setNotifyName(String notifyName) {
        this.notifyName = notifyName;
    }

    public String getUploader() {
        return uploader;
    }

    public void setUploader(String uploader) {
        this.uploader = uploader;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFileSize() {
        return fileSize;
    }

    public void setFileSize(String fileSize) {
        this.fileSize = fileSize;
    }

    public Integer getDownTimes() {
        return downTimes;
    }

    public void setDownTimes(Integer downTimes) {
        this.downTimes = downTimes;
    }

    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    @Override
    public String toString() {
        return "Notify [id=" + id + ", notifyName=" + notifyName + ", uploader=" + uploader + ", fileName=" + fileName
                + ", fileSize=" + fileSize + ", downTimes=" + downTimes + ", createDate=" + createDate
                + ", nickName=" + nickName + ", note=" + note + "]";
    }

    public void setFileItem(FileItem fileItem) {
        this.fileItem = fileItem;
    }

    public FileItem getFileItem() {
        return fileItem;
    }

}
